home *** CD-ROM | disk | FTP | other *** search
Wrap
ssssffff2222((((4444)))) ssssffff2222((((4444)))) NNNNAAAAMMMMEEEE sf2, SoundFont, SoundFont2 - SoundFont Compatible Audio File Format SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////aaaauuuuddddiiiiooooffffiiiilllleeee....hhhh>>>> DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN The Audio File Library currently supports 13 of the commonly found audio file formats, i.e., is able to recognize, read, and write sample data and header information to and from files in these formats. It is important not to confuse _s_a_m_p_l_e or _a_u_d_i_o _d_a_t_a _f_o_r_m_a_t_s with _f_i_l_e _f_o_r_m_a_t_s. The former refers to the bit-wise organization of the sound samples in the file, i.e., whether the format is 8-bit integer or 16-bit unsigned, etc. Audio file format refers to the structure of the _a_u_d_i_o _f_i_l_e _h_e_a_d_e_r, the chunk of on-disk data which preceeds the samples and which provides information about the file to the audio program. A single audio file format may support a large variety of sample formats. The SSSSoooouuuunnnnddddFFFFoooonnnntttt CCCCoooommmmppppaaaattttiiiibbbblllleeee FFFFiiiilllleeee FFFFoooorrrrmmmmaaaatttt ((((ssssffff2222)))) was developed by E-mu Systems, Inc., for use on PC's. It consists of a complex RIFF header containing large amounts of information about the sound samples, plus an imbedded, contiguous block of binary data representing the sound samples. DDDDAAAATTTTAAAA FFFFOOOORRRRMMMMAAAATTTT SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNNSSSS SSSSaaaammmmpppplllleeee FFFFoooorrrrmmmmaaaattttssss:::: Two's complement integer only. SSSSaaaammmmpppplllleeee WWWWiiiiddddtttthhhhssss:::: 16 bit only. BBBByyyytttteeee OOOOrrrrddddeeeerrrrssss:::: Always littleendian. CCCChhhhaaaannnnnnnneeeellll CCCCoooouuuunnnnttttssss:::: 1 channel only. CCCCoooommmmpppprrrreeeessssssssiiiioooonnnn FFFFoooorrrrmmmmaaaattttssss:::: None. FFFFIIIILLLLEEEE FFFFOOOORRRRMMMMAAAATTTT SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNNSSSS SF2 file headers contain vast amounts of information. The Audio File Library parses a small portion of this information for use as an instrument chunk. IIIInnnnssssttttrrrruuuummmmeeeennnntttt CCCCoooonnnnffffiiiigggguuuurrrraaaattttiiiioooonnnnssss:::: SoundFont2 headers contain a multi-level architecture of Presets, Instruments, and Instrument Zones (a sample plus its articulation data). This "Instrument" is not the same level of structure as the AF inst chunk; an Instrument can contain any number of Instrument Zones, each of which is the approximate equivalent to an AF inst. Each audio sample may be used any number of times in different Instrument Zones. PPPPaaaaggggeeee 1111 ssssffff2222((((4444)))) ssssffff2222((((4444)))) Currently a maximum of 1 allowed for writing, though any number may be found in a file opened for reading. A single loop per inst is allowed. The Audio File Library parses each Instrument Zone as a separate inst chunk -- which often results in literally thousands of insts! Each one references a set of instrument parameters (see below) which provides a partial description of the MIDI articulation for that Instrument Zone. In order to allow this possibly-vast number of insts to be grouped, an integer parameter for the parent Instrument or Preset is provided. IIIInnnnssssttttppppaaaarrrraaaammmmssss aaaassssssssoooocccciiiiaaaatttteeeedddd wwwwiiiitttthhhh tttthhhhiiiissss iiiinnnnsssstttt:::: Standard Params: AF_INST_MIDI_BASENOTE AF_INST_NUMCENTS_DETUNE AF_INST_MIDI_LONOTE AF_INST_MIDI_HINOTE AF_INST_MIDI_LOVELOCITY AF_INST_MIDI_HIVELOCITY AF_INST_NUMDBS_GAIN SoundFont - specific Params: AF_INST_SAMP_STARTFRAME Starting frame offset for sample AF_INST_SAMP_ENDFRAME Ending frame for sample AF_INST_SAMP_MODE Sample loop mode. One of three values: - AF_INST_LOOP_OFF Loop not used ("one shot") - AF_INST_LOOP_CONTINUOUS Sample loops through release - AF_INST_LOOP_SUSTAIN Sample loops for sustain only ("sampled release") AF_INST_SAMP_RATE Sample rate of sample referenced by inst AF_INST_TRACKID Track ID for inst AF_INST_NAME Name of sample referenced by inst AF_INST_PRESET_NAME Name of preset containing the inst AF_INST_PRESETID ID of preset containing the inst Currently, all the SoundFont - specific params are read-only See aaaaffffSSSSeeeettttIIIInnnnssssttttPPPPaaaarrrraaaammmmLLLLoooonnnngggg(3dm) for more information about parameters. MMMMaaaarrrrkkkkeeeerrrrssss:::: Unlike AAAAIIIIFFFFFFFF(3dm) and WWWWAAAAVVVVEEEE(3dm) files, there is no direct association between markers and loops. However, for backwards compatibility, an application may choose to specify loop start and end points via the PPPPaaaaggggeeee 2222 ssssffff2222((((4444)))) ssssffff2222((((4444)))) traditional AIFF-style method using mark id's (aaaaffffSSSSeeeettttLLLLooooooooppppSSSSttttaaaarrrrtttt(3dm), etc.) or via the newer aaaaffffSSSSeeeettttLLLLooooooooppppSSSSttttaaaarrrrttttFFFFrrrraaaammmmeeee(3dm) and related routines. In both cases, _o_n_l_y the loop information will be written out to the header because this format does not support markers. Using the first-listed method, two markers are allowed, one for the start location and one for the end point of the loop. When a file is opened for reading, the AF will generate a synthetic pair of markers for each loop found in the file. This is done to allow currently-existing applications to extract loop points via the old aaaaffffGGGGeeeettttLLLLooooooooppppSSSSttttaaaarrrrtttt(3dm) mechanism. It is important to remember that these markers are not actually present in the header or file. MMMMiiiisssscccceeeellllllllaaaannnneeeeoooouuuussss CCCChhhhuuuunnnnkkkkssss:::: AAAAFFFF____MMMMIIIISSSSCCCC____CCCCOOOOPPPPYYYY copyright string AAAAFFFF____MMMMIIIISSSSCCCC____AAAAUUUUTTTTHHHH author string AAAAFFFF____MMMMIIIISSSSCCCC____NNNNAAAAMMMMEEEE name string AAAAFFFF____MMMMIIIISSSSCCCC____CCCCOOOOMMMMMMMMEEEENNNNTTTT text comment string AAAAFFFF____MMMMIIIISSSSCCCC____IIIICCCCRRRRDDDD creation date string _AAAA_FFFF______MMMM_IIII_SSSS_CCCC______IIII_SSSS_FFFF_TTTT software name string SSSSEEEEEEEE AAAALLLLSSSSOOOO afInitFileFormat(3dm), afGetFileFormat(3dm), afIntro(3dm), afGetInstIDs(3dm), afGetInstParams(3dm) PPPPaaaaggggeeee 3333